#define RNSIZE 1000000

#include <iostream>
#include <fstream>
#include <math.h>
#include "probConvTableGenerator.h"

#define INDEXSIZE 14348907L	//3^15
//#define INDEXSIZE 531441L
#define WRITEBUFFSIZE  531441L //3^12
using namespace std;
signed char mySign[INDEXSIZE];
signed char absoluteIndexToInequality[INDEXSIZE][15];

int main(void)
{

	//generate the large indexedInquality 
	
	
	signed char* currentWritePointer=mySign;
	
	for(long i=0;i<INDEXSIZE;i++)
	{
		
		for(int j=0; j<=14;j++)
		{
			absoluteIndexToInequality[i][j]=(signed char)((i%((long)pow((double)3,(double)(j+1)))-i%((long)pow((double)3,(double)((j))))/(long)pow((double)3,(double)j))-1);
		}
		
		
		mySign[i]=0;
		
	}
	
	
	//signed char writeBuff[WRITEBUFFSIZE];
	ofstream prunedOut( "pruned.data" , ios::binary);
	if(prunedOut)
	{
		
		prunedOut.write((char*)mySign,INDEXSIZE);
		prunedOut.close();
		cout<<"pruned.data saved\n";
	}
	return 0;
}